package initialize

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"shop_srv_api/user_web/middlewares"
	"shop_srv_api/user_web/router"
)

/**
 * @Description
 * @Author huran
 * @Date
 * @Param
 * @return
 **/

func Routers() *gin.Engine {
	zap.S().Debug("初始化Router")
	server := gin.Default()
	//解决跨域问题
	server.Use(middlewares.Cors())
	group := server.Group("/v1")
	router.InitUserRouter(group)
	router.InitBaseRouter(group)
	return server
}
